package com.czk.gulimall.auth.feign;

import com.czk.common.utils.R;
import com.czk.gulimall.auth.vo.SocialUser;
import com.czk.gulimall.auth.vo.UserLoginVo;
import com.czk.gulimall.auth.vo.UserRegistVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @Author:ChenZhangKun
 * @Date: 2022/2/27 14:26
 */
@FeignClient(value = "gulimall-member")
public interface MemberFeignService {
    /**
     * 用户注册
     *
     * @param vo
     * @return
     */
    @PostMapping("/member/member/regist")
    R regist(@RequestBody UserRegistVo vo);

    /**
     * 登录
     *
     * @param vo
     * @return
     */
    @PostMapping("/member/member/login")
    R login(@RequestBody UserLoginVo vo);

    /**
     * 社交登录
     *
     * @param socialUser
     * @return
     */
    @PostMapping("/member/member/auth/login")
    R login(@RequestBody SocialUser socialUser);
}
